import OpenAI from "openai";
export default async function (str: string) {
    const openai = new OpenAI({
        baseURL: 'https://api.deepseek.com',
        apiKey: 'sk-07bcf3610cce44e4a44d81c45a24199f',
        dangerouslyAllowBrowser: true
    });

    const response = await openai.chat.completions.create({
        model: "deepseek-chat",
        stream: true,
        messages: [{ role: "user", content: str }],
    });

    return response;
}
